Fixed bug sent directly to me. Basically, we weren't checking a failure case
from load_module, and returning junk to the application. Bad.
See ChangeLog for more info.
+2000-01-05 Mark Crichton <crichton@gimp.org>
+
+ * gdk-pixbuf/gdk-pixbuf-loader.c (gdk_pixbuf_loader_eat_header_write):
+ Return 0 if gdk_pixbuf_load_loader_module returns FALSE.
+
2000-01-05 Elliot Lee <sopwith@redhat.com>
* gdk-pixbuf/pixops/Makefile.am: Link with -lm (to get 'ceil' function)
priv->header_buf_offset += nbytes;
- if(priv->header_buf_offset >= LOADER_HEADER_SIZE)
- gdk_pixbuf_loader_load_module(loader);
-
+ if(priv->header_buf_offset >= LOADER_HEADER_SIZE) {
+ if (gdk_pixbuf_loader_load_module(loader) == 0)
+ return 0;
+ }
return nbytes;
}
priv->header_buf_offset += nbytes;
- if(priv->header_buf_offset >= LOADER_HEADER_SIZE)
- gdk_pixbuf_loader_load_module(loader);
-
+ if(priv->header_buf_offset >= LOADER_HEADER_SIZE) {
+ if (gdk_pixbuf_loader_load_module(loader) == 0)
+ return 0;
+ }
return nbytes;
}